package com.oig.sys.workflow.constants;

public class JobEnums {
    private JobEnums(){}


    public enum JobType{
        HTTP("01","HTTP任务"),
        ;
        private final String code;
        private final String name;

        public String getCode() {
            return code;
        }
        public String getName() {
            return name;
        }

        JobType(String code, String name){
            this.code = code;
            this.name = name;
        }

        public static boolean validCode(String code) {
            for (JobType enumItems : JobType.values()) {
                if (enumItems.getCode().equals(code)) {
                    return true;
                }
            }
            return false;
        }
    }


    public enum FinishOptType{
        NOTIFY("1","通知"),
        WEB_HOOK("2","web_hook")
        ;
        private final String code;
        private final String name;

        public String getCode() {
            return code;
        }
        public String getName() {
            return name;
        }

        FinishOptType(String code, String name){
            this.code = code;
            this.name = name;
        }
    }

}
